From: Zander Brown Date: Thu, 9 Nov 2023 15:44:00 +0000 (+0000) Subject: iconGrid: Use class handlers for ::child-{added,removed} X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~303 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d01355539226f432ffb9ff23becf6e886fe751ad;p=gnome-shell.git iconGrid: Use class handlers for ::child-{added,removed} Part-of: --- diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index 916d69ce4..d55f30d13 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -1192,12 +1192,10 @@ export const IconGrid = GObject.registerClass({ this._currentPage = 0; this._currentMode = -1; - this.connect('child-added', this._childAdded.bind(this)); - this.connect('child-removed', this._childRemoved.bind(this)); this.connect('destroy', () => layoutManager.disconnect(pagesChangedId)); } - _childAdded(grid, child) { + vfunc_child_added(child) { child._iconGridKeyFocusInId = child.connect('key-focus-in', () => { this._ensureItemIsVisible(child); }); @@ -1247,7 +1245,7 @@ export const IconGrid = GObject.registerClass({ this._setGridMode(bestMode); } - _childRemoved(grid, child) { + vfunc_child_removed(child) { child.disconnect(child._iconGridKeyFocusInId); delete child._iconGridKeyFocusInId; }